package com.cmsky.open.cms.enums;

import com.cmsky.open.core.util.JsonUtils;

public enum CmsNodePropertyKey {
	Title("标题","tit"),
	Context("内容","cxt"),
	Href("链接地址","hf"),
	Src("资源地址","src"),
	Ref("引用栏目号","ref"),
	GoodsId("广告商品Id","gsid"),
	;
	private String key;
	private String name;
	
	
	public String getKey() {
		return key;
	}
	public String getName() {
		return name;
	}

	private CmsNodePropertyKey(String name,String key) {
		this.key = key;
		this.name = name;
	}
	
	public static CmsNodePropertyKey getByKey(String key){
		CmsNodePropertyKey result = null;
		for(CmsNodePropertyKey e : CmsNodePropertyKey.values()){
			if(e.getKey().equals(key)){
				result = e;
				break;
			}
		}
		return result;
	}
	
}
